<?php
/**
 * Created by Allen.
 * Date: 15-11-25
 * 文章分类模型
 */

class System_money_zhuan_log_model extends HS_Model {


    //获取结果集
    public function getSystemMoneyZhuanLogList($where=array(), $limit='20', $offset='0', $order_by='id desc')
    {
    	return $this->where($where)->limit($limit, $offset)->order_by($order_by)->find_all();
    }
    
    //获取所有结果集
    public function getSystemMoneyZhuanLogAll($where=array('id >' => '1'))
    {
    	return $this->where($where)->find_all();
    }
    
    
    //计算行数
    public function getCount($where = array())
    {
    	return $this->where($where)->count();
    }  
     
    //获取单个
    public function checkSystemMoneyZhuanLog($where)
    {
    	return $this->where($where)->find();
    }
    
    //删除
    public function deleteSystemMoneyZhuanLog($where)
    {
    	return $this->where($where)->delete();
    }
    
    //删除多行
    public function deleteAll($where)
    {
    	return $this->where_in('id',$where)->delete();
    }
    
    //编辑
    public function editSystemMoneyZhuanLog($where,$data)
    {
    	return $this->where($where)->edit($data);
    }
    
    //添加
    public function addSystemMoneyZhuanLog($data)
    {
    	if ($this->add($data))
    	{
    		return $this->db->insert_id();
    	}
    }
}
?>
